package dao.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

/**
 * IfwRechargeInfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "ifw_recharge_info", catalog = "fw")
public class IfwRechargeInfo extends BasePojo implements java.io.Serializable {

	// Fields

	private Integer rechargeIndex;
	private IfwCardInfo ifwCardInfo;
	private IfwAgentDevInfo ifwAgentDevInfo;
	private Integer rechargeHost;
	private Integer rechargeAc;
	private Long rechargeTime;
	private String time;
	private String cardNum;
	private String sn;

	@Override
	public Object getEntityId() {
		// TODO Auto-generated method stub
		return rechargeIndex;
	}

	// Property accessors
	@Id
	@TableGenerator(name = "RECHARGEINDEX_GEN", table = "sequence", pkColumnName = "SEQ_NAME", valueColumnName = "SEQ_COUNT", pkColumnValue = "SEQ_RECHARGEINDEX", allocationSize = 1)
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "RECHARGEINDEX_GEN")
	@Column(name = "recharge_index", unique = true, nullable = false)
	public Integer getRechargeIndex() {
		return this.rechargeIndex;
	}

	public void setRechargeIndex(Integer rechargeIndex) {
		this.rechargeIndex = rechargeIndex;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "card_index")
	public IfwCardInfo getIfwCardInfo() {
		return this.ifwCardInfo;
	}

	public void setIfwCardInfo(IfwCardInfo ifwCardInfo) {
		this.ifwCardInfo = ifwCardInfo;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "agent_dev_index")
	public IfwAgentDevInfo getIfwAgentDevInfo() {
		return this.ifwAgentDevInfo;
	}

	public void setIfwAgentDevInfo(IfwAgentDevInfo ifwAgentDevInfo) {
		this.ifwAgentDevInfo = ifwAgentDevInfo;
	}

	@Column(name = "recharge_host", nullable = false)
	public Integer getRechargeHost() {
		return this.rechargeHost;
	}

	public void setRechargeHost(Integer rechargeHost) {
		this.rechargeHost = rechargeHost;
	}

	@Column(name = "recharge_ac", nullable = false)
	public Integer getRechargeAc() {
		return this.rechargeAc;
	}

	public void setRechargeAc(Integer rechargeAc) {
		this.rechargeAc = rechargeAc;
	}

	@Column(name = "recharge_time", nullable = false)
	public Long getRechargeTime() {
		return this.rechargeTime;
	}

	public void setRechargeTime(Long rechargeTime) {
		this.rechargeTime = rechargeTime;
	}

	@Column(name = "time", nullable = false, length = 19)
	public String getTime() {
		return this.time;
	}

	public void setTime(String time) {
		this.time = time;
	}

	@Column(name = "card_num")
	public String getCardNum() {
		return cardNum;
	}

	public void setCardNum(String cardNum) {
		this.cardNum = cardNum;
	}

	@Column(name = "sn")
	public String getSn() {
		return sn;
	}
	
	public void setSn(String sn) {
		this.sn = sn;
	}

}